lexer grammar TxtLexer;

@header {
package org.moflon.moca.txt.parser;
}
// lexer rules:
WHITESPACE: (' ' | '\t' | '\r' | '/*' .* '*/') { skip(); };
SEPERATOR:'--- --- --- --- --- --- --- ---';
COLSEP:'|';
FIGURE: 
'K'{this.setText("KW_KingWhite");}
|'Q' {this.setText("QW_QueenWhite");}
|'R'{this.setText("RW_RookWhite");}
|'B'{this.setText("BW_BishopWhite");}
|'N'{this.setText("NW_KnightWhite");}
|'P'{this.setText("PW_PawnWhite");}
|'k'{this.setText("KB_KingBlack");}
|'q'{this.setText("QB_QueenBlack");}
|'r'{this.setText("RB_RookBlack");}
|'b'{this.setText("BB_BishopBlack");}
|'n'{this.setText("NB_KnightBlack");}
|'p'{this.setText("PB_PawnBlack");} ;
NewLine :
  ('\r' '\n' | '\r' | '\n') {$channel=HIDDEN;}; 
